<?php if (!defined('THINK_PATH')) exit();?><html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<head><title>玩玩吧！</title></head>
<style>
	#content{
		float:left;
		width:100%;
		height:100px;
		border:1px solid blue;
	}
	#left{
		float:left;
		width:100px;
		height:100px;
		border:1px solid blue;
	}
	#right{
		float:right;
		width:100px;
		height:100px;
		border:1px solid blue;
		display:none;
	}
</style>
<script>
	//切换
	function move(b1,b2){
		va1=document.getElementById(b1);
		va2=document.getElementById(b2);
		va2.style.display="none";
		va1.style.display="block";
	}
	function showHint(str)
	{
	  alert("1234");
	var xmlhttp;
	if (str.length==0)
	  {
	  document.getElementById("txtHint").innerHTML="";
	  return;
	  }
	if (window.XMLHttpRequest)
	  
	else
	  
	xmlhttp.onreadystatechange=function()
	  {
	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
		document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
		}
	  }
	xmlhttp.open("GET","Index/ajaxPrac/q/"+str,true);
	xmlhttp.send();
	}
</script>
 <script src="/Green/Public/Js/jquery-3.1.1.slim.js"></script><!--jQuery-->
 
<body>
<div id="content">
<h3>请在下面的输入框中键入字母（A - Z）：</h3>
姓氏：<input type="text" id="txt1" onkeyup="showHint(this.value)" />
<p>建议：<span id="txtHint"></span></p> 
</div>
</body>
</html>